package org.dromara.patrol.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.patrol.domain.PatrolReportRectify;

import java.io.Serial;

/**
 * 巡店管理-巡店报告整改业务对象 patrol_report_rectify
 *
 * @author han
 * @date 2024-03-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PatrolReportRectify.class, reverseConvertGenerate = false)
public class PatrolReportRectifyBo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 7407030520195226339L;
    /**
     * 整改id
     */
    @NotNull(message = "整改id不能为空", groups = { EditGroup.class })
    private Long rectifyId;

    /**
     * 整改人id
     */
    @NotNull(message = "整改人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long rectifyPersonId;

    /**
     * 整改内容
     */
    // @NotBlank(message = "整改内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 整改图片[
            {
                "key": "patrol/2024-03-14/bdd70a00-e1de-11ee-8517-777063f1ffca",
                "fileUrl": "https://yd-img-pro.yunding360.com/up0dcnng/patrol/2024-03-14/bdd70a00-e1de-11ee-8517-777063f1ffca",
                "imagePath": null,
                "mediaType": null
            }
        ]
     */
    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    private Object files;

    /**
     * 巡店报告扣分、问题、整改项id（patrol_template_node.id）
     */
    @NotNull(message = "巡店报告扣分、问题、整改项id（patrol_template_node.id）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long nodeId;

    /**
     * 任务流步骤id
     */
    // @NotNull(message = "任务流步骤id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long processStepInstanceId;

    /**
     * 任务报告id
     */
    @NotNull(message = "任务报告id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long reportId;


}
